package com.yuelao.yuelao_backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 群成员表
 */
@Data
@TableName("group_members")
public class GroupMember implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 群ID
     */
    private Long groupId;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 角色: owner, admin, member
     */
    private String role;

    /**
     * 群昵称
     */
    private String nickname;

    /**
     * 是否被禁言
     */
    private Boolean isMuted;

    /**
     * 禁言到期时间
     */
    private LocalDateTime mutedUntil;

    /**
     * 加入时间
     */
    private LocalDateTime joinedAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;
}

